package com.ai.wxy.spring.jpa.sys.dto;

import com.ai.spring.common.annotation.AddGroup;
import com.ai.spring.common.annotation.EditGroup;
import com.ai.wxy.spring.service.api.dto.ServiceParam;
import com.ai.wxy.spring.service.api.dto.ServiceResult;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 请求服务接口配置
 *
 * @author 石头
 * @Date 2019/11/21
 * @Version 1.0
 **/
@Data
public class SysConfDTO implements ServiceParam {
    /**主键*/
    @NotNull(groups = EditGroup.class,message = "配置ID不能为空")
    private Long id;
    /**请求编码*/
    private String sysCode;
    /**请求参数名称,scope为PATH时有用*/
    private String paramName;
    /**请求参数类型*/
    @NotBlank(groups = AddGroup.class,message = "请求参数类型不能为空")
    private String paramType;
    /**服务接口ID*/
    @NotBlank(groups = AddGroup.class,message = "服务接口ID不能为空")
    private String svcId;
    /**服务接口方法*/
    @NotBlank(groups = AddGroup.class,message = "服务接口方法不能为空")
    private String svcMethod;
    /**请求scope（REQ_PARAM,REQ_BODY,PATH）*/
    @Pattern(regexp = "REQ_PARAM|REQ_BODY|PATH",message = "格式错误【请求scope只能是REQ_PARAM,REQ_BODY,PATH中的一个】")
    private String reqScope;
    /**描述*/
    private String desc;
}
